//
//  HACDemoTwoCell.m
//  HACDispatcher
//
//  Created by J.Cheng on 2019/5/14.
//  Copyright © 2019 Happy. All rights reserved.
//

#import "HACDemoTwoCell.h"
#import <Masonry/Masonry.h>

@implementation HACDemoTwoCellModel

- (CGFloat)cellHeight {
    if (self.grade < 3) {
        return 88;
    } else {
        return 176;
    }
}

- (NSString *)reusableIdentifier {
    return NSStringFromClass([HACDemoTwoCell class]);
}

@end

@implementation HACDemoTwoCell

- (void)configCellModel:(HACDemoTwoCellModel *)cellModel {
    self.schoolLable.text = cellModel.school;
}


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.schoolLable = [UILabel new];
        self.schoolLable.textColor = [UIColor purpleColor];
        [self.contentView addSubview:self.schoolLable];
        [self.schoolLable mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.equalTo(self.contentView.mas_centerX);
            make.centerY.equalTo(self.contentView.mas_centerY);
        }];
    }
    return self;
}

@end
